/**
 * @description { nps init } 根据 `package.json的scripts` 生成 `package-scripts` 配置文件
 */
module.exports = {
  scripts: {
    serve: {
      default: {
        description: '开发阶段',
        script: 'vue-cli-service serve',
      },
      open: {
        description: '开发阶段 自动打开浏览器',
        script: 'vue-cli-service serve --open',
      },
    },
    build: {
      default: {
        description: '打包命令',
        script: 'vue-cli-service build',
      },
      preview: {
        description: '打包并起服务预览',
        script: 'node build/index.js --preview',
      },
    },
    test: {
      unit: {
        description: '测试用例',
        script: 'jest --clearCache && vue-cli-service test:unit',
      },
    },
    lint: {
      description: '检查出错误并修正',
      script: 'vue-cli-service lint',
    },
    svgo: {
      description: 'svg 处理',
      script: 'svgo -f src/icons/svg --config=src/icons/svgo.yml',
    },
    plop: {
      description: '模板生成器',
      script: 'plop',
    },
  },
};
